\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex}{}\section{Introduction\+To\+Algorithm\+:\+:Graph\+Algorithm\+:\+:D\+F\+S\+\_\+\+Vertex$<$ K\+Type $>$ Struct Template Reference}
\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex$<$ K\+Type $>$@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex$<$ K\+Type $>$}}


D\+F\+S\+\_\+\+Vertex：用于深度优先搜索的顶点类型，算法导论22章22.3节  




{\ttfamily \#include $<$dfs\+\_\+vertex.\+h$>$}

Inheritance diagram for Introduction\+To\+Algorithm\+:\+:Graph\+Algorithm\+:\+:D\+F\+S\+\_\+\+Vertex$<$ K\+Type $>$\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124}{C\+O\+L\+O\+R} \{ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124ab5bf627e448384cf3a4c35121ca6008d}{C\+O\+L\+O\+R\+::\+W\+H\+I\+T\+E}, 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124a48bf014c704c9eaae100a98006a37bf7}{C\+O\+L\+O\+R\+::\+G\+R\+A\+Y}, 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124a08d0012388564e95c3b4a7407cf04965}{C\+O\+L\+O\+R\+::\+B\+L\+A\+C\+K}
 \}
\item 
typedef int \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aeb115a10366eb62880d2672d4e1da7a1}{V\+I\+D\+Type}
\item 
typedef K\+Type \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ab53cda3a7d135ed892b298c14d5579fe}{Key\+Type}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a91c4d3427c469cbb16459f6a34ac1307}{D\+F\+S\+\_\+\+Vertex} ()
\begin{DoxyCompactList}\small\item\em 默认构造函数，将{\ttfamily color}设为白色，发现时间与完成时间默认为-\/1 \end{DoxyCompactList}\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a2b44ef3bada5ce96e84fbd5e6b8c0e56}{D\+F\+S\+\_\+\+Vertex} (const \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ab53cda3a7d135ed892b298c14d5579fe}{Key\+Type} \&k)
\begin{DoxyCompactList}\small\item\em 显式构造函数，指定{\ttfamily key} \end{DoxyCompactList}\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_adbee712bffa03e88e3624a144528fe54}{D\+F\+S\+\_\+\+Vertex} (const \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ab53cda3a7d135ed892b298c14d5579fe}{Key\+Type} \&k, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aeb115a10366eb62880d2672d4e1da7a1}{V\+I\+D\+Type} d)
\begin{DoxyCompactList}\small\item\em 显式构造函数，指定{\ttfamily key}和编号 \end{DoxyCompactList}\item 
void \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ab1969489b2a5d73191da5664b127226d}{set\+\_\+disovered} (int discover\+\_\+t)
\begin{DoxyCompactList}\small\item\em set\+\_\+disovered：发现本顶点 \end{DoxyCompactList}\item 
void \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a07353127c56aabb5c411ca7f4d28c553}{set\+\_\+finished} (int finish\+\_\+t)
\begin{DoxyCompactList}\small\item\em set\+\_\+finished：设本顶点为搜索完毕状态 \end{DoxyCompactList}\item 
std\+::string \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9a8a8c8b2ad1c3b6e90d2c2efb7cbe2e}{to\+\_\+string} ()
\begin{DoxyCompactList}\small\item\em to\+\_\+string：返回顶点的字符串描述 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aab1b292c1d228d57ef3d20af908fe2cf}{discover\+\_\+time}
\item 
int \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aa0f17c70784c1dcc199487e519814e61}{finish\+\_\+time}
\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124}{C\+O\+L\+O\+R} \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9111c3d35ad67867402564643493655f}{color}
\item 
std\+::shared\+\_\+ptr$<$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex}{D\+F\+S\+\_\+\+Vertex} $>$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ad243c81b3c0705a136b6a1e5debdb6ed}{parent}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename K\+Type$>$struct Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex$<$ K\+Type $>$}

D\+F\+S\+\_\+\+Vertex：用于深度优先搜索的顶点类型，算法导论22章22.3节 

深度优先搜索的顶点类型继承自{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex}{Vertex}}模板类型，它比{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex}{Vertex}}多了四个数据成员：


\begin{DoxyItemize}
\item {\ttfamily color}：顶点的颜色。顶点可以有三种颜色，分别为{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124a08d0012388564e95c3b4a7407cf04965}{D\+F\+S\+\_\+\+Vertex\+::\+C\+O\+L\+O\+R\+::\+B\+L\+A\+C\+K}}、{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124ab5bf627e448384cf3a4c35121ca6008d}{D\+F\+S\+\_\+\+Vertex\+::\+C\+O\+L\+O\+R\+::\+W\+H\+I\+T\+E}}、{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124a48bf014c704c9eaae100a98006a37bf7}{D\+F\+S\+\_\+\+Vertex\+::\+C\+O\+L\+O\+R\+::\+G\+R\+A\+Y}}
\item {\ttfamily parent}\+: 指向父顶点的强引用
\item {\ttfamily discover\+\_\+time}：顶点的发现时间
\item {\ttfamily finish\+\_\+time}：顶点的完成时间
\end{DoxyItemize}

广度优先搜索的顶点类型还支持以下两个操作：


\begin{DoxyItemize}
\item {\ttfamily set\+\_\+disovered(discover\+\_\+t)}：发现本顶点
\item {\ttfamily set\+\_\+finished(finish\+\_\+t)}：本顶点搜索完毕 
\end{DoxyItemize}

Definition at line 42 of file dfs\+\_\+vertex.\+h.



\subsection{Member Typedef Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ab53cda3a7d135ed892b298c14d5579fe}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!Key\+Type@{Key\+Type}}
\index{Key\+Type@{Key\+Type}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{Key\+Type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ typedef K\+Type {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::{\bf Key\+Type}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ab53cda3a7d135ed892b298c14d5579fe}
顶点存储数据的类型 

Definition at line 46 of file dfs\+\_\+vertex.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aeb115a10366eb62880d2672d4e1da7a1}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!V\+I\+D\+Type@{V\+I\+D\+Type}}
\index{V\+I\+D\+Type@{V\+I\+D\+Type}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{V\+I\+D\+Type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ typedef int {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::{\bf V\+I\+D\+Type}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aeb115a10366eb62880d2672d4e1da7a1}
顶点编号的数据类型 

Definition at line 45 of file dfs\+\_\+vertex.\+h.



\subsection{Member Enumeration Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!C\+O\+L\+O\+R@{C\+O\+L\+O\+R}}
\index{C\+O\+L\+O\+R@{C\+O\+L\+O\+R}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{C\+O\+L\+O\+R}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ enum {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex\+::\+C\+O\+L\+O\+R}\hspace{0.3cm}{\ttfamily [strong]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{W\+H\+I\+T\+E@{W\+H\+I\+T\+E}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!W\+H\+I\+T\+E@{W\+H\+I\+T\+E}}\item[{\em 
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124ab5bf627e448384cf3a4c35121ca6008d}{}W\+H\+I\+T\+E\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124ab5bf627e448384cf3a4c35121ca6008d}
}]\index{G\+R\+A\+Y@{G\+R\+A\+Y}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!G\+R\+A\+Y@{G\+R\+A\+Y}}\item[{\em 
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124a48bf014c704c9eaae100a98006a37bf7}{}G\+R\+A\+Y\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124a48bf014c704c9eaae100a98006a37bf7}
}]\index{B\+L\+A\+C\+K@{B\+L\+A\+C\+K}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!B\+L\+A\+C\+K@{B\+L\+A\+C\+K}}\item[{\em 
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124a08d0012388564e95c3b4a7407cf04965}{}B\+L\+A\+C\+K\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9455444fdfb1b29f24c1d27e74e7c124a08d0012388564e95c3b4a7407cf04965}
}]\end{description}
\end{Desc}


Definition at line 47 of file dfs\+\_\+vertex.\+h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a91c4d3427c469cbb16459f6a34ac1307}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!D\+F\+S\+\_\+\+Vertex@{D\+F\+S\+\_\+\+Vertex}}
\index{D\+F\+S\+\_\+\+Vertex@{D\+F\+S\+\_\+\+Vertex}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{D\+F\+S\+\_\+\+Vertex()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::{\bf D\+F\+S\+\_\+\+Vertex} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a91c4d3427c469cbb16459f6a34ac1307}


默认构造函数，将{\ttfamily color}设为白色，发现时间与完成时间默认为-\/1 



Definition at line 51 of file dfs\+\_\+vertex.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a2b44ef3bada5ce96e84fbd5e6b8c0e56}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!D\+F\+S\+\_\+\+Vertex@{D\+F\+S\+\_\+\+Vertex}}
\index{D\+F\+S\+\_\+\+Vertex@{D\+F\+S\+\_\+\+Vertex}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{D\+F\+S\+\_\+\+Vertex(const Key\+Type \&k)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::{\bf D\+F\+S\+\_\+\+Vertex} (
\begin{DoxyParamCaption}
\item[{const {\bf Key\+Type} \&}]{k}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a2b44ef3bada5ce96e84fbd5e6b8c0e56}


显式构造函数，指定{\ttfamily key} 


\begin{DoxyParams}{Parameters}
{\em k\+:顶点存放的数据} & 顶点的颜色默认设为白色，发现时间与完成时间默认为-\/1 \\
\hline
\end{DoxyParams}


Definition at line 58 of file dfs\+\_\+vertex.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_adbee712bffa03e88e3624a144528fe54}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!D\+F\+S\+\_\+\+Vertex@{D\+F\+S\+\_\+\+Vertex}}
\index{D\+F\+S\+\_\+\+Vertex@{D\+F\+S\+\_\+\+Vertex}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{D\+F\+S\+\_\+\+Vertex(const Key\+Type \&k, V\+I\+D\+Type d)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::{\bf D\+F\+S\+\_\+\+Vertex} (
\begin{DoxyParamCaption}
\item[{const {\bf Key\+Type} \&}]{k, }
\item[{{\bf V\+I\+D\+Type}}]{d}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_adbee712bffa03e88e3624a144528fe54}


显式构造函数，指定{\ttfamily key}和编号 


\begin{DoxyParams}{Parameters}
{\em k\+:顶点存放的数据} & \\
\hline
{\em d\+:顶点的编号} & 顶点的颜色默认设为白色，发现时间与完成时间默认为-\/1 \\
\hline
\end{DoxyParams}


Definition at line 68 of file dfs\+\_\+vertex.\+h.



\subsection{Member Function Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ab1969489b2a5d73191da5664b127226d}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!set\+\_\+disovered@{set\+\_\+disovered}}
\index{set\+\_\+disovered@{set\+\_\+disovered}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{set\+\_\+disovered(int discover\+\_\+t)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ void {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::set\+\_\+disovered (
\begin{DoxyParamCaption}
\item[{int}]{discover\+\_\+t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ab1969489b2a5d73191da5664b127226d}


set\+\_\+disovered：发现本顶点 


\begin{DoxyParams}{Parameters}
{\em discover\+\_\+t\+:发现时间} & 发现本顶点要执行两个操作：\\
\hline
\end{DoxyParams}

\begin{DoxyItemize}
\item 将本顶点的颜色设为灰色
\item 将本顶点的{\ttfamily discover\+\_\+time}设为{\ttfamily discover\+\_\+t} 
\end{DoxyItemize}

Definition at line 81 of file dfs\+\_\+vertex.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a07353127c56aabb5c411ca7f4d28c553}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!set\+\_\+finished@{set\+\_\+finished}}
\index{set\+\_\+finished@{set\+\_\+finished}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{set\+\_\+finished(int finish\+\_\+t)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ void {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::set\+\_\+finished (
\begin{DoxyParamCaption}
\item[{int}]{finish\+\_\+t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a07353127c56aabb5c411ca7f4d28c553}


set\+\_\+finished：设本顶点为搜索完毕状态 


\begin{DoxyParams}{Parameters}
{\em finish\+\_\+t\+:完成时间} & 设本顶点为搜索完毕状态要执行两个操作：\\
\hline
\end{DoxyParams}

\begin{DoxyItemize}
\item 将本顶点的颜色设为黑色
\item 将本顶点的{\ttfamily finish\+\_\+time}设为{\ttfamily finish\+\_\+t} 
\end{DoxyItemize}

Definition at line 96 of file dfs\+\_\+vertex.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9a8a8c8b2ad1c3b6e90d2c2efb7cbe2e}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!to\+\_\+string@{to\+\_\+string}}
\index{to\+\_\+string@{to\+\_\+string}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{to\+\_\+string()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ std\+::string {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::to\+\_\+string (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9a8a8c8b2ad1c3b6e90d2c2efb7cbe2e}


to\+\_\+string：返回顶点的字符串描述 

\begin{DoxyReturn}{Returns}
\+:顶点的字符串描述
\end{DoxyReturn}
在{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_vertex}{Vertex}}基类的基础上输出{\ttfamily color}以及{\ttfamily parent}、{\ttfamily discover\+\_\+time}以及{\ttfamily finish\+\_\+time}信息。 

Definition at line 107 of file dfs\+\_\+vertex.\+h.



\subsection{Member Data Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9111c3d35ad67867402564643493655f}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!color@{color}}
\index{color@{color}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{color}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ {\bf C\+O\+L\+O\+R} {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::color}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_a9111c3d35ad67867402564643493655f}
顶点颜色 

Definition at line 132 of file dfs\+\_\+vertex.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aab1b292c1d228d57ef3d20af908fe2cf}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!discover\+\_\+time@{discover\+\_\+time}}
\index{discover\+\_\+time@{discover\+\_\+time}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{discover\+\_\+time}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ int {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::discover\+\_\+time}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aab1b292c1d228d57ef3d20af908fe2cf}
顶点发现时间 

Definition at line 130 of file dfs\+\_\+vertex.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aa0f17c70784c1dcc199487e519814e61}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!finish\+\_\+time@{finish\+\_\+time}}
\index{finish\+\_\+time@{finish\+\_\+time}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{finish\+\_\+time}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ int {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::finish\+\_\+time}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_aa0f17c70784c1dcc199487e519814e61}
顶点完成时间 

Definition at line 131 of file dfs\+\_\+vertex.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ad243c81b3c0705a136b6a1e5debdb6ed}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}!parent@{parent}}
\index{parent@{parent}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}}
\subsubsection[{parent}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename K\+Type$>$ std\+::shared\+\_\+ptr$<${\bf D\+F\+S\+\_\+\+Vertex}$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+D\+F\+S\+\_\+\+Vertex}$<$ K\+Type $>$\+::parent}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_d_f_s___vertex_ad243c81b3c0705a136b6a1e5debdb6ed}
顶点父顶点的强引用 

Definition at line 133 of file dfs\+\_\+vertex.\+h.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/graph\+\_\+algorithms/basic\+\_\+graph/graph\+\_\+representation/graph\+\_\+vertex/\hyperlink{dfs__vertex_8h}{dfs\+\_\+vertex.\+h}\end{DoxyCompactItemize}
